<template>
    <!--,'iphonex-style':isIphoneXSeres() 这里我觉得现在没必要去适配iphonex很多浏览器自己已经适配了-->
    <div id="app" :class="{'disabled' : $store.state.loadingImg,'stop-click':stopClick}">
        <router-view v-wechat-title="$route.meta.title" />
        <div class="loading-wrap" v-if="this.$store.state.loadingImg" id="loadingImg">
            <img :src="staticImageUrl('images/loading.gif')" alt="">
        </div>
        <v-toast></v-toast>
    </div>
</template>

<script>
// import Vconsole from 'vconsole';
window.wx = require('weixin-js-sdk');
import rem from '../static/js/rem'
import StringUtils from './utils/StringUtils'
export default {
    name: 'App',
    data () {
        return {
            stopClick: false
        }
    },
    created () {
    },
    mounted () {
        // if (window.location.href.includes('test.haokanhaowan.cn') || window.location.href.includes('192.168.1.163:7280')) {
        // let vConsole = new Vconsole();
        // }
        // this.VideoPlayAudioClose();
        /*解决html fontsize为0的问题*/
        setTimeout(() => {
            let dom = document.documentElement.style.fontSize;
            if (!dom || parseInt(dom) < 10) {
                rem.fontSizeRem();
            }
            // 判断URL的参数有没有，路由判断不了，获取不到路由的参数
            // OS零售打开好看好玩页面不让点击，只让显示

            if (StringUtils.GetQueryString('previewController') && StringUtils.GetQueryString('previewController') == 'true' && StringUtils.GetQueryString('ttn') && StringUtils.GetQueryString("ttn") == 1) {
                this.stopClick = true
                document.getElementsByClassName('slide-wrap')[0].classList.add('hidden')
            }
        }, 2000)
    },
    methods: {
    },
    components: {
        'v-toast': () => import('./components/commonComponents/toast/ToastShowHide'),
        // 'v-loading':()=>import('./components/commonComponents/loading/SmallIcon'),
    }
}
</script>
<style lang="scss">
@import url($css_root+"css/base.css");
@import url($css_root+"icon/iconfont.css");
</style>
<style lang="scss">
/*[v-cloak] {*/
/*display: none !important;*/
/*}*/
.stop-click {
    pointer-events: none !important;
    // display: subgrid;
}
.hidden {
    display: none;
}
.mint-msgbox {
    width: 3rem;
    -webkit-border-radius: 0.1rem;
    -moz-border-radius: 0.1rem;
    border-radius: 0.1rem;
}
.mint-msgbox-content {
}
.mint-msgbox-message {
    color: #333;
}
.mint-msgbox-btn {
    height: 0.5rem;
    line-height: 0.5rem;
    box-sizing: border-box;
}
.mint-msgbox-btns {
    height: 0.5rem;
}
.mint-msgbox-confirm {
    color: #8ba9e8;
}
.loading-wrap {
    width: 1rem;
    height: 1rem;
    padding: 0.2rem;
    box-sizing: border-box;
}
</style>
